<template>
   <div class="main">
       <div class="left" @click="goback">←</div>
       <div class="mid">{{tit}}</div>
       <div class="right"></div>
   </div>
</template>

<script>
export default {
    data(){
        return{
  
        }
     
    },
    methods:{
        // 父组件用goback实现跳转
        goback(){
            this.$parent.goback()
        }
    },
     props:['tit']
}
</script>

<style scoped lang='less'>
    .main{
        background: rgb(255, 86, 84);
        color: #fff;
        height: 125px;
        width: 100%;
        display: flex;
        flex-direction: row;
        align-items:center;
        justify-content: center;
        .left{
            margin-left: 5px;
            flex: 1 1 auto;
        }
         .mid{
            flex: 1 1 auto;
            text-align: center;
        }
         .right{
            flex: 1 1 auto;
        }
    }
</style>
